<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String username = "";
	String password = "";
	Cookie[] cookies = request.getCookies();
	if(cookies != null){
		for(Cookie c:cookies){
			if("uname".equals(c.getName())){
				username = c.getValue();
			}
			
			if("upwd".equals(c.getName())){
				password = c.getValue();
			}
		}
	}
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
	.red{
		color:red
	}
</style>
</head>
<body>
	<form action="/demo/login.do" method="POST">
		用户:<input type="text" name="username" value="<%=username %>"> <br>
		密码:<input type="password" name="password" value="<%=password %>"> <br>
			<input type="submit" value="登录">
			<span class="red">
				${msg}
			</span>
			<input type="checkbox" name="autoSave" checked>保存账号密码
	</form>
</body>
</html>